'use strict';

module.exports = config => {
    
    const exports = {};
    exports.oAuth2Server = {
        debug: config.env === 'local',
        grants: [ 'password', 'authorization_code','client_credentials'],
    };

    exports.keys = '_nodejs_egg_auth2_server';

    exports.security = {
      csrf:{
        enable:false
      }
    }

    exports.cluster = {
      listen: {
        port: 7002,
        hostname: '127.0.0.1',
        // path: '/var/run/egg.sock',
      }
    };

    exports.mysql = {
      // 单数据库信息配置
      client: {
        // host
        host: '47.107.251.86',
        // 端口号
        port: '3306',
        // 用户名
        user: 'root',
        // 密码
        password: '123456',
        // 数据库名
        database: 'db_sungpu_test',
      },
      // 是否加载到 app 上，默认开启
      app: true,
      // 是否加载到 agent 上，默认关闭
      agent: false,
    };

    exports.sequelize = {
      dialect: 'mysql',
      host: '47.107.251.86',
      port: 3306,
      database: 'node-demo',
      username: 'root',
      password: '123456',
    };
    return exports;
};